<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<%@ include file="/common/taglibs.jsp"%>
<x:parse xml="${param.xmlstr}" var="xmlData" />
<div class="t_bar">
	 主要知识产权证明目录
</div>
<table  id="tblCooperation2" cellpadding="0" class="t_css" width="100%" border="0" cellpadding="0" style="*border-bottom: #a1c0dc 1px solid;">
			<col width="4%" />
			<col width="11%" />
			<col width="13%" />
			<col width="9%" />
			<col width="9%" />
			<col width="10%" />
			<col width="8%" />
			<col width="8%" />
			<col width="11%" />
			<col width="9%" />
			<col width="8%" />
			<thead >
					<tr style="border:1px solid #B7D1E6">
						<th class="TblHead" align="center" >序号</th>
						<th class="TblHead" align="center" >知识产权类别</th> 
						<th class="TblHead" align="center" >知识产权具体名称</th> 
				       <th class="TblHead" align="center" >国家（地区）</th> 
						<th class="TblHead" align="center" >授权号</th> 
						<th class="TblHead" align="center" >授权日期</th> 
						<th class="TblHead" align="center" >证书编号</th> 
						<th class="TblHead" align="center" >权利人</th> 
						<th class="TblHead" align="center" >发明人</th> 
						<th class="TblHead" align="center" >专利有效状态</th> 
						<th class="TblHead" align="center" >相似知识<br/>产权情况</th>
					</tr>
			</thead>
			<tbody id="tab">
				<c:set value="0" var="index" scope="page"/>
					<x:forEach select="$xmlData/data/knowledge/list" var="list">
					<c:choose>
						<c:when test="${index<10}" ><c:set value="0" var="flag" scope="page"/></c:when>
						<c:otherwise><c:set value="" var="flag" scope="page"/></c:otherwise>
					</c:choose>
					<tr>
						<td align="center">&nbsp;
							<span name="award_state/list[${flag}${index}]@seq_no" ><x:out select="$list/@seq_no"/></span> 
						</td>
						<td align="left" >&nbsp;
							<x:out select="$list/knowledge_type"/>
						</td>
						<td align="left" >&nbsp;
							<span name="knowledge/list[${flag}${index}]/knowledge_name" ><x:out select="$list/knowledge_name"/></span>
						</td>
						<td align="left" >&nbsp;
							<x:out select="$list/country_area"/>
						</td>
						<td align="left" >&nbsp;
							<security:authorize ifNotGranted="A_AUTH_PSZJ">	
								<x:out select="$list/approve_no"/>
							</security:authorize>
							<security:authorize ifAnyGranted="A_AUTH_PSZJ">
								******
							</security:authorize>
						</td>
						<td align="center" >&nbsp;
							<x:out select="$list/approve_date"/>
						</td>		
						<td align="left" >&nbsp;
							<security:authorize ifNotGranted="A_AUTH_PSZJ">	
								<x:out select="$list/certificate_no"/>
							</security:authorize>
							<security:authorize ifAnyGranted="A_AUTH_PSZJ">
								******
							</security:authorize>
						</td>		
						<td align="left" >&nbsp;
							<security:authorize ifNotGranted="A_AUTH_PSZJ">	
								<x:out select="$list/right_psn"/>
							</security:authorize>
							<security:authorize ifAnyGranted="A_AUTH_PSZJ">
								******
							</security:authorize>
						</td>		
						<td align="left" >&nbsp;
							<security:authorize ifNotGranted="A_AUTH_PSZJ">	
								<x:out select="$list/invent_psn"/>
							</security:authorize>
							<security:authorize ifAnyGranted="A_AUTH_PSZJ">
								******
							</security:authorize>
							
						</td>	
						
						<td align="left" >&nbsp;
						<x:out select="$list/patent_condition"/>	
						</td>
						<td align="center">
							<input type="hidden" name="knowledge/list[${flag}${index}]/similarity"  maxlength="20" label="相似知识产权情况"/>
							<security:authorize ifNotGranted="A_AUTH_PSZJ">	
							<a href="###" class="yase" id="similarity_${flag}${index}" onclick="showSimilarityInfo(this,1);"></a>
							</security:authorize>
							<security:authorize ifAnyGranted="A_AUTH_PSZJ">
								<a ></a>
							</security:authorize>
						</td>
					</tr>
					<c:set value="${index+1}" var="index" scope="page"/>
					</x:forEach>
			</tbody>
	</table>
	<br>
<script type="text/javascript">
$(function(){
	//window.setTimeout(findSimilarity,3000);

});
function findSimilarity(){
	$("#tblCooperation2").find("tr:gt(0)").each(function(){
		var knowledgeName=$(this).find("span[name$='knowledge_name']").text();
		var obj=$(this).find("input[name$='similarity']");
		var obj1=$(this).find("a");
		if(knowledgeName!=""){
			$.ajax({
    		    url: "${ctx}/proposal/findSimilarityNum",
    		    data:{
    		    	'sourceName':knowledgeName,
    		    	'type':'1',
    		    	'posCode':'${posCode}'
    		    },
    		    type: "POST",
    		    dataType: 'text',
    		    timeout: 10000,
    		    async:false,
    		    error: function(){
    		        alert("查询相似知识产权情况失败");
    		    },
    		    success: function(data){
    		    	obj.val(data);
    		    	obj1.text(data);
    		    }
    		});
		}
	});
}
</script>